home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-01 | 10.2 KB | 284 lines | [TEXT/MPS ] |
- ;
- ; File: DriverFamilyMatching.a
- ;
- ; Contains: xxx put contents here xxx
- ;
- ; Version: Technology: xxx put the technology version here xxx
- ; Release: Universal Interfaces 3.0d3 on Copland DR1
- ;
- ; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
- ;
- ; Bugs?: If you find a problem with this file, send the file and version
- ; information (from above) and the problem description to:
- ;
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
- IF &TYPE('__DRIVERFAMILYMATCHING__') = 'UNDEFINED' THEN
- __DRIVERFAMILYMATCHING__ SET 1
-
- IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
- include 'Types.a'
- ENDIF
- IF &TYPE('__NAMEREGISTRY__') = 'UNDEFINED' THEN
- include 'NameRegistry.a'
- ENDIF
- IF &TYPE('__TEXTOBJECTS__') = 'UNDEFINED' THEN
- include 'TextObjects.a'
- ENDIF
- IF &TYPE('__CODEFRAGMENTS__') = 'UNDEFINED' THEN
- include 'CodeFragments.a'
- ENDIF
- ; Please refer to Devices.i for DriverDescriptor definition for Marconi
- IF FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE THEN
- ;
- ;#########################################################
- ; Descriptor for Drivers and NDRVs
- ;#########################################################
- ;
- ; Driver Typing Information Used to Match Drivers With Devices
- DriverType RECORD 0
- nameInfoStr ds Str31 ; offset: $0 (0) ; Driver Name/Info String
- version ds NumVersion ; offset: $20 (32) ; Driver Version Number
- sizeof EQU * ; size: $24 (36)
- ENDR
- ; typedef struct DriverType * DriverTypePtr
-
- ; OS Runtime Information Used to Setup and Maintain a Driver's Runtime Environment
- ; typedef OptionBits RuntimeOptions
-
-
- kDriverIsLoadedUponDiscovery EQU $00000001 ; auto-load driver when discovered
- kDriverIsOpenedUponLoad EQU $00000002 ; auto-open driver when loaded
- kDriverIsUnderExpertControl EQU $00000004 ; I/O expert handles loads/opens
- kDriverIsConcurrent EQU $00000008 ; supports concurrent requests
- kDriverQueuesIOPB EQU $00000010 ; device manager doesn't queue IOPB
- kDriverIsLoadedAtBoot EQU $00000020 ; Driver is loaded at the boot time
- kDriverIsForVirtualDevice EQU $00000040 ; Driver is for a virtual Device
- DriverOSRuntime RECORD 0
- driverRuntime ds.l 1 ; offset: $0 (0) ; Options for OS Runtime
- driverName ds Str31 ; offset: $4 (4) ; Driver's name to the OS
- driverDescReserved ds.l 8 ; offset: $24 (36) ; Reserved area
- sizeof EQU * ; size: $44 (68)
- ENDR
- ; typedef struct DriverOSRuntime * DriverOSRuntimePtr
-
- ; OS Service Information Used To Declare What APIs a Driver Supports
- ; typedef UInt32 ServiceCount
-
- DriverServiceInfo RECORD 0
- serviceCategory ds.l 1 ; offset: $0 (0) ; Service Category Name
- serviceType ds.l 1 ; offset: $4 (4) ; Type within Category
- serviceVersion ds NumVersion ; offset: $8 (8) ; Version of service
- sizeof EQU * ; size: $C (12)
- ENDR
- ; typedef struct DriverServiceInfo * DriverServiceInfoPtr
-
- DriverOSService RECORD 0
- nServices ds.l 1 ; offset: $0 (0) ; Number of Services Supported
- service ds DriverServiceInfo ; offset: $4 (4) <-- really an array of length one ; The List of Services (at least one)
- sizeof EQU * ; size: $10 (16)
- ENDR
- ; typedef struct DriverOSService * DriverOSServicePtr
-
- ; Categories
-
- kServiceCategoryDisplay EQU 'disp' ; Display Manager
- kServiceCategoryOpenTransport EQU 'otan' ; Open Transport
- kServiceCategoryBlockStorage EQU 'blok' ; Block Storage
- kServiceCategoryNdrvDriver EQU 'ndrv' ; Generic Native Driver
- kServiceCategoryScsiSIM EQU 'scsi' ; SCSI
- kServiceCategoryFileManager EQU 'file' ; File Manager
- kServiceCategoryIDE EQU 'ide-' ; ide
- kServiceCategoryADB EQU 'adb-' ; adb
- kServiceCategoryPCI EQU 'pci-' ; pci bus
- ; Nu Bus
- kServiceCategoryPCMCIA EQU 'pcmc' ; PCMCIA
- kServiceCategoryDFM EQU 'dfm-' ; DFM
- kServiceCategoryMotherBoard EQU 'mrbd' ; mother Board
- kServiceCategoryKeyboard EQU 'kybd' ; Keyboard
- kServiceCategoryPointing EQU 'poit' ; Pointing
- kServiceCategoryRTC EQU 'rtc-' ; RTC
- kServiceCategoryNVRAM EQU 'nram' ; NVRAM
- kServiceCategorySound EQU 'sond' ; Sound (1/3/96 MCS)
- kServiceCategoryPowerMgt EQU 'pgmt' ; Power Management
- kServiceCategoryGeneric EQU 'genr' ; Generic Service Category to receive general Events
- ; Ndrv ServiceCategory Types
-
- kNdrvTypeIsGeneric EQU 'genr' ; generic
- kNdrvTypeIsVideo EQU 'vido' ; video
- kNdrvTypeIsBlockStorage EQU 'blok' ; block storage
- kNdrvTypeIsNetworking EQU 'netw' ; networking
- kNdrvTypeIsSerial EQU 'serl' ; serial
- kNdrvTypeIsSound EQU 'sond' ; sound
- kNdrvTypeIsBusBridge EQU 'brdg'
- ; typedef UInt32 DriverDescVersion
-
- ; The Driver Description
-
- kInitialDriverDescriptor EQU 0
- kVersionOneDriverDescriptor EQU 1
-
- kTheDescriptionSignature EQU 'mtej'
- kDriverDescriptionSignature EQU 'pdes'
- DriverDescription RECORD 0
- driverDescSignature ds.l 1 ; offset: $0 (0) ; Signature field of this structure
- driverDescVersion ds.l 1 ; offset: $4 (4) ; Version of this data structure
- driverType ds DriverType ; offset: $8 (8) ; Type of Driver
- driverOSRuntimeInfo ds DriverOSRuntime ; offset: $2C (44) ; OS Runtime Requirements of Driver
- driverServices ds DriverOSService ; offset: $70 (112) ; Apple Service API Membership
- sizeof EQU * ; size: $80 (128)
- ENDR
- ; typedef struct DriverDescription * DriverDescriptionPtr
-
- ENDIF
- IF FOR_SYSTEM8_PREEMPTIVE THEN
- ;
- ;################################################
- ; Family Matching Data Structure
- ;################################################
- ;
- ; The Family Type
-
- kFamilyIsHighLevel EQU 0 ; High Level Family
- kFamilyIsLowLevel EQU 1 ; Low Level Family
- ; typedef UInt32 FamilyLevel
-
- ; Family Typing Information Used to Match Families With plug-ins and Devices
- FamilyType RECORD 0
- familyLevel ds.l 1 ; offset: $0 (0) ; Kind of Family
- familyName ds.l 1 ; offset: $4 (4) ; Family Name
- version ds NumVersion ; offset: $8 (8) ; Family Version Number
- reserved ds.l 1 ; offset: $C (12) ; Used by Mother Board Expert
- sizeof EQU * ; size: $10 (16)
- ENDR
- ; typedef struct FamilyType * FamilyTypePtr
-
-
- kFamilyIsLoadedAtBoot EQU $00000001 ; Family is loaded at the boot time
- kFamilyIsLoadedUponDiscovery EQU $00000002 ; auto-load Family when discovered
- kFamilyIsStartedAtBoot EQU $00000004 ; Family is initialized at the Boot
- ; typedef UInt32 FamilyOSRunTimeOptions
-
- FamilyOSRunTime RECORD 0
- familyRuntime ds.l 1 ; offset: $0 (0) ; Options for OS Runtime
- familyName ds Str31 ; offset: $4 (4) ; Family's name to the OS
- familyDescReserved ds.l 8 ; offset: $24 (36) ; Reserved area
- sizeof EQU * ; size: $44 (68)
- ENDR
- ; typedef struct FamilyOSRunTime * FamilyOSRunTimePtr
-
- ; The Family Description
-
- kFamilyDescriptionSignature EQU 'fdes'
- ; typedef UInt32 FamilyDescVersion
-
-
- kInitialFamilyDescriptor EQU 0
- kMotherBoardDescriptor EQU 1
- ; typedef UInt32 DependencyCount
-
- MatchingAndDependencyInfo RECORD 0
- deviceName ds Str31 ; offset: $0 (0) ; the device name to match
- ORG 0
- dependency ds.l 1 ; offset: $0 (0) ; Dependency List
- ORG 32
- sizeof EQU * ; size: $20 (32)
- ENDR
- ; typedef struct MatchingAndDependencyInfo * MatchingAndDependencyInfoPtr
-
- FamilyMatchingAndDependency RECORD 0
- nrElements ds.l 1 ; offset: $0 (0) ; Number of elements in the Array
- matchingInfo ds MatchingAndDependencyInfo ; offset: $4 (4) <-- really an array of length one
- sizeof EQU * ; size: $24 (36)
- ENDR
- ; typedef struct FamilyMatchingAndDependency * FamilyMatchingAndDependencyPtr
-
- FamilyDescription RECORD 0
- familyDescSignature ds.l 1 ; offset: $0 (0) ; Signature field of this structure
- familyDescVersion ds.l 1 ; offset: $4 (4) ; Version of this data structure
- familyType ds FamilyType ; offset: $8 (8) ; Type of Driver
- familyOSRuntime ds FamilyOSRunTime ; offset: $18 (24) ; OS Runtime Requirements of Family
- familymatchingAndDependency ds FamilyMatchingAndDependency ; offset: $5C (92) ; Family Dependency Info
- sizeof EQU * ; size: $80 (128)
- ENDR
- ; typedef struct FamilyDescription * FamilyDescriptionPtr
-
- ;
- ;##############################################
- ; Definition of "driver-ptr" property
- ;##############################################
- ;
- DriverPtrProperty RECORD 0
- pluginLocator ds.l 1 ; offset: $0 (0)
- length ds.l 1 ; offset: $4 (4)
- sizeof EQU * ; size: $8 (8)
- ENDR
- ; typedef struct DriverPtrProperty * DriverPtrPropertyPtr
-
- ;
- ;##############################################
- ; Status Definition for DFMReportInitStatus
- ;##############################################
- ;
-
- kInitStatusOK EQU 0
- kInitStatusNotOK EQU 1
- ;
- ;##############################################
- ; Declare the pluginLoadID
- ;##############################################
- ;
-
-
- ;
- ;##############################################
- ; Function Prototypes
- ;##############################################
- ;
- ;
- ; extern UInt32 DFMReportInitStatus(OSType serviceCategory, UInt32 status)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION DFMReportInitStatus
- ENDIF
-
- ;
- ; extern OSStatus DFMRemovePlugIns(RegEntryRef *device, OSType serviceCategory, UInt32 nrPlugIns, LogicalAddress *pluginLocatorsInUse)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION DFMRemovePlugIns
- ENDIF
-
- ;
- ; extern OSStatus DFMLoadPlugin(LogicalAddress pluginLocator, ConstStr63Param pluginName, PluginLoadID *pluginLoadID, LogicalAddress *main, LogicalAddress *pluginDT, TextObject optErrMsg)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION DFMLoadPlugin
- ENDIF
-
- ;
- ; extern OSStatus DFMUnloadPlugin(PluginLoadID *pluginLoadID)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION DFMUnloadPlugin
- ENDIF
-
- ;
- ; extern OSStatus DFMGetCFragConnectID(PluginLoadID *pluginLoadID, CFragConnectionID *connectionID)
- ;
- IF GENERATINGCFM THEN
- IMPORT_CFM_FUNCTION DFMGetCFragConnectID
- ENDIF
-
- ;
- ;##############################################
- ; Well known properties in the Name Registry
- ;##############################################
- ;
- ; CPassThru
- ENDIF
- ENDIF ; __DRIVERFAMILYMATCHING__
-
-